package com.shun.auth.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * 用户登录DTO
 * @author clever
 * @since 2021-09-24
 */
@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class UserLoginDto implements Serializable {

    //用户账号
    private String account;

    //用户密码
    private String password;

    //用户的电话号
    @Pattern(regexp = "^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\\d{8}$",message = "不符合电话格式！")
    private String telNo;

    //用户的验证码
    private String imgCode;

    //移动距离
    private String moveLength;

    //检验类型
    @NotBlank
    private String checkType;

    //用户的类型
    private String bizType;
}
